﻿using Crocodile.SimplexLanguage.Tree;



namespace Crocodile.SimplexLanguage.Gardener
{

    public class SimplexSyntaxError
    {

        public readonly SimplexEntity Entity;
        public readonly string ErrorMessage;


        public SimplexSyntaxError(SimplexEntity entity, string errorMessage, params object[] args)
        {
            Entity = entity;
            ErrorMessage = string.Format(errorMessage, args);
        }


        public override string ToString()
        {
            return Entity.FileName + '[' + Entity.LineNr + "]:\t" + ErrorMessage;
        }
    }

}
